<template>
    <div>
        <div class="e-form" v-if="dialogVisible === false">
            <BillTop :title="$route.meta.title" @cancel="handleClose"></BillTop>
            <div class="tabs warningTabs"></div>
            <div class="tabs" v-if="Object.keys(formData).length != 0">
                <el-tabs tab-position="left" v-model="tabsName" @tab-click="onChangeTab">
                    <!-- 基本信息 -->
                    <el-tab-pane
                        label="基本信息"
                        name="baseInfo"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <el-tab-pane
                        label="拟招标内容明细"
                        name="detail"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <el-tab-pane
                        label="招标清单"
                        name="tenderList"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <el-tab-pane
                        label="招标澄清"
                        name="clarification"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <el-tab-pane
                        label="招标条款"
                        name="clause"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <el-tab-pane
                        label="附件信息"
                        name="attach"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <el-tab-pane
                        label="审核历史"
                        name="auditHistory"
                        :disabled="clickTabFlag"
                    ></el-tab-pane>
                    <div>
                        <div id="baseInfoCon" class="con">
                            <div class="tabs-title" id="baseInfo">基本信息</div>
                            <div style="width: 100%" class="form">
                                <el-form ref="form" :model="form" label-width="170px">
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="采购编号" width="220">
                                                <div style="display: flex">
                                                    <!-- <el-input v-model="formData.tenderApplyNo" @focus="noFocus" ref="noFocus1">
                                            </el-input> -->
                                                    <span>{{ formData.tenderApplyNo }}</span>
                                                    <el-button
                                                        style="
                                                            background: #33ab9f;
                                                            margin-left: 10px;
                                                            color: #fff;
                                                        "
                                                        size="mini"
                                                        @click="showBidding"
                                                        >查看</el-button
                                                    >
                                                </div>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="采购单位">
                                                <span>{{ formData.tenderUser }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <!-- name、id -->
                                            <el-form-item label="申请机构" width="230">
                                                <span>{{ formData.applyOrgName }}</span>
                                                <!-- <el-input v-model="formData.applyOrgName" @focus="noFocus" ref="noFocus2">
                                                <i class="el-icon-document-copy" slot="suffix" @click="openNewPage('OrgSelectData')"> </i>
                                            </el-input> -->
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="申请日期">
                                                <span>{{ formData.applyTime }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="采购方式">
                                                <span>{{
                                                    formData.tenderForm | tenderForm(this)
                                                }}</span>
                                                <!-- kvId、name -->
                                                <el-select
                                                    v-model="formData.tenderForm"
                                                    placeholder="请选择"
                                                    @change="selectChange($event, '采购方式')"
                                                >
                                                    <el-option
                                                        v-for="item in options.tenderForm"
                                                        :key="item.value"
                                                        :label="item.label"
                                                        :value="item.value"
                                                    >
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="招标类型">
                                                <span>{{
                                                    formData.tenderClass | tenderClass(this)
                                                }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="拟采购项目名称" width="200">
                                                {{ formData.tenderName }}
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="拟采购金额（元）">
                                                <span>{{ formData.tenderAmount }}</span>
                                                <!-- <el-input v-model="formData.tenderAmount" placeholder="汇总计算"></el-input> -->
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="投标保证金（元）">
                                                <span>{{ formData.tenderBail }}</span>
                                                <!-- <el-input v-model placeholder="填写"></el-input> -->
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="录入机构">
                                                <!-- id、name -->
                                                <span>{{ formData.orgName }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="采购公告：">
                                                <el-button
                                                    style="width: 222px"
                                                    class="btn-greenYellow"
                                                    @click="handleNotice"
                                                    >采购公告</el-button
                                                >
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="币种">
                                                <span>{{
                                                    formData.currencyId | currencyId(this)
                                                }}</span>
                                                <!-- <el-select
                                                v-model="formData.currencyId"
                                                placeholder="请选择"
                                                @change="selectChange($event, '币种')"
                                            >
                                                <el-option
                                                    v-for="item in options.currency"
                                                    :key="item.kvId"
                                                    :label="item.kvKey"
                                                    :value="item.kvId"
                                                >
                                                </el-option>
                                            </el-select> -->
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-form-item label="采购需求陈述*：">
                                            <span>{{ formData.tenderDemand }}</span>
                                            <!-- <el-input
                                            type="textarea"
                                            :rows="2"
                                            placeholder="请输入内容"
                                            v-model="formData.tenderDemand"
                                            style="margin-right: 110px"
                                        >
                                        </el-input> -->
                                        </el-form-item>
                                    </el-row>
                                    <el-row>
                                        <el-form-item label="变更原因：">
                                            <span>{{ formData.changeReason }}</span>
                                            <!-- <el-input
                                            type="textarea"
                                            :rows="2"
                                            placeholder="请输入内容"
                                            v-model="formData.changeReason"
                                            style="margin-right: 110px"
                                        >
                                        </el-input> -->
                                        </el-form-item>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="本位币">
                                                <span>{{ formData.baseCurName }}</span>
                                            </el-form-item>
                                        </el-col>
                                        <el-col
                                            :span="12"
                                            v-if="formData.baseCurName !== formData.currency"
                                        >
                                            <el-form-item label="人民币汇率">
                                                <span>{{ formData.rmbRate }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="拟采购金额（本位币）">
                                                <span>{{ formData.baseCurAmount }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <el-form-item label="计划编号">
                                                <span>{{ formData.planNo }}</span>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="状态">
                                                <span>{{ formData.state | state(this) }}</span>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                </el-form>
                            </div>
                        </div>

                        <div id="detailCon" class="con">
                            <div class="tabs-title" id="detail">拟招标内容明细</div>
                            <div class="e-table">
                                <div class="top">
                                    <div class="left">
                                        <div>
                                            <el-button size="small" class="btn-greenYellow"
                                                >新增</el-button
                                            >
                                        </div>
                                    </div>
                                </div>
                                <el-table
                                    :data="tableData"
                                    border
                                    style="width: 100%"
                                    @cell-mouse-enter="cellMouseEnter"
                                    @cell-mouse-leave="cellMouseLeave"
                                    :cell-class-name="cellClsNm"
                                >
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="a1"
                                        label="包件编号"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="a"
                                        label="包件名称"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="b"
                                        label="起止桩号"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="招标最高限价(元)"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="d"
                                        label="分包商名称"
                                    >
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="e" label="税率">
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="f" label="税额">
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip label="操作">
                                        <template slot-scope="scope">
                                            <span v-if="scope.row.g == '0'" style="color: #e85442"
                                                >未审核</span
                                            >
                                            <span v-if="scope.row.g == '1'" style="color: #4773db"
                                                >审核中</span
                                            >
                                            <span v-if="scope.row.g == '2'" style="color: #979797"
                                                >已审核</span
                                            >
                                        </template>
                                    </el-table-column>
                                </el-table>
                                <ComPagination />
                            </div>
                        </div>

                        <div id="tenderListCon" class="con">
                            <div class="tabs-title" id="tenderList">招标清单</div>
                            <div style="display: flex">
                                <div class="left">
                                    <ComTreeFile />
                                </div>
                                <div class="right" style="margin-left: 20px; width: 100%">
                                    <ComTreeTable />
                                </div>
                            </div>

                            <div class="tabs-title" id="files">公文文件</div>
                            <div class="e-table">
                                <div class="top">
                                    <div class="left">
                                        <el-button size="mini">下载</el-button>
                                        <el-button size="mini">删除</el-button>
                                        <el-button
                                            size="mini"
                                            style="padding: 7px 30px"
                                            class="btn-greenYellow"
                                            >选择公文</el-button
                                        >
                                    </div>
                                </div>
                                <el-table
                                    :data="tableData"
                                    border
                                    style="width: 100%"
                                    @cell-mouse-enter="cellMouseEnter"
                                    @cell-mouse-leave="cellMouseLeave"
                                    :cell-class-name="cellClsNm"
                                >
                                    <el-table-column show-overflow-tooltip width="55">
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="a1" label="序号">
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="a"
                                        label="公文文件名称"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="b"
                                        label="上传时间"
                                    >
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="c" label="上传人">
                                    </el-table-column>
                                </el-table>
                                <ComPagination />
                            </div>
                        </div>

                        <div id="clarification" class="con">招标澄清</div>

                        <div id="clauseCon" class="con">
                            <div class="tabs-title" id="clause">通用合同条款</div>
                            <div class="e-table" style="min-height: auto">
                                <el-table
                                    :data="tableData"
                                    border
                                    style="width: 100%"
                                    @cell-mouse-enter="cellMouseEnter"
                                    @cell-mouse-leave="cellMouseLeave"
                                    :cell-class-name="cellClsNm"
                                >
                                    <el-table-column show-overflow-tooltip prop="a1" label="序号">
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="a"
                                        label="所属单位"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="b"
                                        label="通用合同条款编号"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="合同条款名称"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="d"
                                        label="条款明细查阅"
                                    >
                                    </el-table-column>
                                </el-table>
                                <ComPagination />
                            </div>

                            <div class="tabs-title" style="margin-top: 20px">项目专用合同条款</div>
                            <div class="e-table" style="min-height: auto; margin-bottom: 20px">
                                <div class="top">
                                    <div class="left">
                                        <div>
                                            <el-button size="small" class="btn-greenYellow"
                                                >新增</el-button
                                            >
                                            <el-button size="small" class="btn-greenYellow"
                                                >删除</el-button
                                            >
                                        </div>
                                    </div>
                                </div>
                                <el-table
                                    :data="tableData"
                                    border
                                    style="width: 100%"
                                    @cell-mouse-enter="cellMouseEnter"
                                    @cell-mouse-leave="cellMouseLeave"
                                    :cell-class-name="cellClsNm"
                                >
                                    <div class="top">
                                        <div class="left">
                                            <el-button size="mini">新增</el-button>
                                            <el-button size="mini">删除</el-button>
                                        </div>
                                    </div>
                                    <el-table-column show-overflow-tooltip prop="a1" label="序号">
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="a" label="条目号">
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="b"
                                        label="原条款内容"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="专用合同条款内容"
                                    >
                                    </el-table-column>
                                </el-table>
                                <ComPagination />
                            </div>
                        </div>

                        <div id="attachCon" class="con">
                            <div class="tabs-title" id="attach">附件信息</div>
                            <div class="e-table">
                                <div class="top">
                                    <div class="left">
                                        <el-button size="mini">下载</el-button>
                                        <el-button size="mini">删除</el-button>
                                    </div>
                                </div>
                                <el-table
                                    :data="tableData"
                                    border
                                    style="width: 100%"
                                    @cell-mouse-enter="cellMouseEnter"
                                    @cell-mouse-leave="cellMouseLeave"
                                    :cell-class-name="cellClsNm"
                                >
                                    <el-table-column show-overflow-tooltip width="55">
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="a1" label="序号">
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="a"
                                        label="文件名称"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="b"
                                        label="文件大小"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="上传时间"
                                    >
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="d" label="上传人">
                                    </el-table-column>
                                </el-table>
                                <ComPagination />
                                <div class="upload">
                                    <el-upload
                                        class="upload-demo"
                                        drag
                                        action="https://jsonplaceholder.typicode.com/posts/"
                                        multiple
                                    >
                                        <el-button type="primary" style="padding: 20px 80px"
                                            >上传附件</el-button
                                        >
                                        <div style="margin-top: 10px; font-size: 12px">
                                            鼠标拖入上传，按住Ctrl可多选附件
                                        </div>
                                    </el-upload>
                                </div>
                            </div>
                        </div>

                        <div id="auditHistoryCon" class="con">
                            <div class="tabs-title" id="auditHistory">审核历史</div>
                            <div class="e-table">
                                <el-table
                                    :data="tableData"
                                    border
                                    style="width: 100%"
                                    @cell-mouse-enter="cellMouseEnter"
                                    @cell-mouse-leave="cellMouseLeave"
                                    :cell-class-name="cellClsNm"
                                >
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="a1"
                                        label="审核级次"
                                    >
                                    </el-table-column>
                                    <el-table-column show-overflow-tooltip prop="a" label="审核人">
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="b"
                                        label="审核人岗位"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="通知时间"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="审核时间"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                        show-overflow-tooltip
                                        prop="c"
                                        label="审核意见"
                                    >
                                    </el-table-column>
                                </el-table>
                            </div>
                            <ComPagination />
                        </div>
                    </div>
                </el-tabs>
            </div>
            <div class="buttons">
                <el-button @click="handleClose">取消</el-button>
            </div>
            <div id="seat" :style="{ height: seatHeight + 'px' }"></div>
        </div>
        <!-- dialog -->
        <ComNoticeDialog
            ref="ComNoticeDialog"
            :dialogVisible.sync="dialogVisible"
            :tenderClass="parseInt(formData.tenderClass)"
            :tenderForm="String(formData.tenderForm)"
            v-if="Object.keys(formData).length !== 0"
            :content="formData.tenderNotice"
            @save="noticeSave"
            :showEdit="false"
        />
    </div>
</template>

<script>
import '@/utils/jquery.scrollTo.min'
import ComTreeTable from '@/templates/table/treeTable.vue'
import ComTreeFile from '@/templates/table/treeFile.vue'
import ComPagination from '@/components/pagination/pagination.vue'
import ComNoticeDialog from '@/components/common/noticeDialog.vue'
import tenderRequest from '@/api/tender/tender.js'
// import applyRequest from '@/api/tender/apply.js'
import { mapState } from 'vuex'

export default {
    data () {
        return {
            tabsName: 'baseInfo',
            screenWidth: 0,
            screenHeight: 0,
            lastConHeight: 0,
            clickTabFlag: false, // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            form: {
                name: '',
                region: '',
                date1: '',
                date2: '',
                delivery: false,
                type: [],
                resource: '',
                desc: ''
            },
            tableData: [],
            value: '',
            textarea: '',
            formData: {},
            test: '',
            selectData: [],
            selectTableColumnAttr: [
                {
                    label: '单据编号',
                    prop: 'billNo'
                },
                {
                    label: '拟招标项目名称',
                    prop: 'tenderName'
                },
                {
                    label: '单据日期',
                    prop: 'gmtCreate'
                },
                {
                    label: '单据机构名称',
                    prop: 'orgName'
                }
            ],
            selectTableColumnWidth: {
                leftWidth: '150',
                rightWidth: '100'
            },
            selectDataPagination: {},
            dialogVisible: false
        }
    },
    computed: {
        ...mapState({
            options: state => state.biddingApplication.dictionaries
        }),
        tenderId () {
            return this.formData.tenderApplyId
        },
        billId () {
            return this.$route.query.billId || this.$route.query.billid
        },
        // 填补底部空白，以使高度够滚动
        seatHeight () {
            return this.screenHeight - 72 - this.lastConHeight
        }
    },
    components: {
        ComTreeTable,
        ComTreeFile,
        ComPagination,
        ComNoticeDialog
    },
    created () {
        this.getData()
        this.judgeRoute()
    },
    mounted () {
        // 保存所有tabName
        const arr = [
            'baseInfo',
            'detail',
            'tenderList',
            'clarification',
            'clause',
            'attach',
            'auditHistory'
        ]
        // 获取最后一个内容区域的高度，计算底部空白
        this.getLastConHeight(arr)
        let $idsTop = []
        window.addEventListener('scroll', () => {
            // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            if (this.clickTabFlag) {
                return
            }

            if (!$idsTop[$idsTop.length - 1]) {
                $idsTop = arr.map(item => {
                    const itemTop = document.getElementById(item)?.offsetTop
                    return itemTop
                })
            }
            const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
            // 倒序查找
            let curLocal = 0
            for (let len = $idsTop.length, i = len - 1; i >= 0; i--) {
                let item = $idsTop[i]
                if (scrollTop + 1 >= item) {
                    curLocal = i
                    break
                }
            }
            // 设置对应tabName
            this.tabsName = arr[curLocal]
        })

        this.screenWidth = document.documentElement.clientWidth - this.topHeight
        this.screenHeight = document.documentElement.clientHeight - this.topHeight
        window.addEventListener('resize', () => {
            this.screenWidth = document.documentElement.clientWidth - this.topHeight
            this.screenHeight = document.documentElement.clientHeight - this.topHeight
            $idsTop = arr.map(item => {
                const itemTop = document.getElementById(item)?.offsetTop
                return itemTop
            })
        })
    },
    beforeDestroy () {
        this.$notify.closeAll()
    },
    methods: {
        noticeSave (content) {
            this.formData.tenderNotice = content
        },
        handleNotice () {
            this.dialogVisible = true
        },
        onChangeTab (e) {
            const height = $('#' + e.name).offset().top
            $.scrollTo(height - this.topHeight, 500)
            // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            this.clickTabFlag = true
            // 动画结束后，恢复状态
            setTimeout(() => {
                this.clickTabFlag = false
            }, 600)
        },
        // 获取最后一个内容区域的高度，计算底部空白
        getLastConHeight (arr) {
            let si = setInterval(() => {
                // 因为dom异步加载，通过轮询找到渲染后的dom，获取高度
                if (document.getElementById(arr[length - 1] + 'Con')) {
                    const lastConHeight = document.getElementById(
                        arr[length - 1] + 'Con'
                    )?.offsetHeight
                    this.lastConHeight = lastConHeight
                    clearInterval(si)
                    si = null
                }
            }, 100)
        },
        noFocus () {
            this.$refs1.noFocus.blur()
            this.$refs2.noFocus.blur()
        },
        showBidding () {
            if (!this.tenderId) return // 前期需求可切换，现在不需要
            this.$notify.closeAll()
            this.$notify({
                title: '查看招标详情',
                dangerouslyUseHTMLString: true,
                message: `正式环境：客户端打开新页面<br>
                测试环境：手动打开新页面<br>
                <textarea cols="35" rows="10">http://localhost:8080/biddingApplicationShow?tenderId=${this.tenderId}</textarea>
                `,
                duration: 0
            })
            // this.$router.push({
            //     path: './biddingApplicationShow',
            //     query: { tenderId: this.tenderId }
            // })
        },
        stateChange (name) {
            this.state = name
            if (name === 'selectData') {
                this.tenderApplyQueryPage()
            }
        },
        tenderApplyNoInputFocus () {
            this.$refs.tenderApplyNoInput.blur()
        },
        getData () {
            tenderRequest.tenderChangeFindById(this.billId).then(res => {
                this.formData = res
                // res
            })
        },
        judgeRoute () {
            if (this.$route.path.includes('Add', this.$route.path.length - 4)) {
                return false
            }
            return true
        },
        // dialogCloseHook () {
        //     this.initData()
        // },
        // initData () {
        //     this.formData = {
        //         state: 0
        //     }
        // },
        // getVuexData () {
        //     // 获取保存在vuex的数据
        //     this.formData = {
        //         ...this.formData,
        //         ...JSON.parse(
        //             JSON.stringify(
        //                 this.$store.state.biddingApplication.formData
        //             )
        //         )
        //     }
        //     // 获取保存在vuex的常量
        //     if (Object.keys(this.$store.state.userInfo.orgInfo).length !== 0) {
        //         this.formData.orgId = this.$store.state.userInfo.orgInfo.orgId
        //         this.formData.orgName =
        //             this.$store.state.userInfo.orgInfo.orgName
        //     }
        //     console.log('this.formData1', this.formData)
        // },
        getNowDate () {
            // 个位数前补0
            const zeroFill = function (num) {
                if (parseInt(num) < 10) {
                    num = '0' + num
                }
                return num
            }
            let nowtime = new Date()
            nowtime =
                zeroFill(nowtime.getFullYear()) +
                '-' +
                zeroFill(nowtime.getMonth() + 1) +
                '-' +
                zeroFill(nowtime.getDate())
            this.$set(this.formData, 'applyTime', nowtime)
        },
        handleFullScreen () {
            this.fullscreen = !this.fullscreen
        },
        handleClose () {
            this.$router.push({
                path: './equipHireBiddingApplicationEdit',
                query: { billid: this.tenderId, seat: 'recodes' }
            })
        },
        cellClsNm ({ column }) {
            if (column.label === '') {
                return 'fixed-left'
            }
        },
        cellMouseEnter (row) {
            this.MouseEnterId = row.id
        },
        cellMouseLeave () {
            this.MouseEnterId = 0
        }
    }
}
</script>

<style lang="scss" scoped>
.form {
    margin-top: 10px;
}

.e-table {
    background: #fff;

    /* .top {
  .left {
    padding: 20px;
    padding-top: 0px;
  }
} */
}

.upload {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    text-align: center;
}

.upload-demo {
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>
